<!DOCTYPE html>
<!--[if IE 9]>         <html class="no-js lt-ie10" lang="en"> <![endif]-->
<!--[if gt IE 9]><!-->
<html class="no-js" lang="en">
	<!--<![endif]-->

	<head>
		<meta charset="utf-8">

		<title>问道——问卷调查系统</title>

		<meta name="description" content="AppUI is a Web App Bootstrap Admin Template created by pixelcave and published on Themeforest">
		<meta name="author" content="pixelcave">
		<meta name="robots" content="noindex, nofollow">

		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

		<!-- Icons -->
		<!-- The following icons can be replaced with your own, they are used by desktop and mobile browsers -->
		<link rel="shortcut icon" href="img/favicon.png">
		<link rel="apple-touch-icon" href="img/icon57.png" sizes="57x57">
		<link rel="apple-touch-icon" href="img/icon72.png" sizes="72x72">
		<link rel="apple-touch-icon" href="img/icon76.png" sizes="76x76">
		<link rel="apple-touch-icon" href="img/icon114.png" sizes="114x114">
		<link rel="apple-touch-icon" href="img/icon120.png" sizes="120x120">
		<link rel="apple-touch-icon" href="img/icon144.png" sizes="144x144">
		<link rel="apple-touch-icon" href="img/icon152.png" sizes="152x152">
		<link rel="apple-touch-icon" href="img/icon180.png" sizes="180x180">
		<!-- END Icons -->

		<!-- Stylesheets -->
		<!-- Bootstrap is included in its original form, unaltered -->
		<link rel="stylesheet" href="css/bootstrap.min.css">

		<!-- Related styles of various icon packs and plugins -->
		<link rel="stylesheet" href="css/plugins.css">

		<!-- The main stylesheet of this template. All Bootstrap overwrites are defined in here -->
		<link rel="stylesheet" href="css/main.css">

		<!-- Include a specific file here from css/themes/ folder to alter the default theme of the template -->

		<!-- The themes stylesheet of this template (for using specific theme color in individual elements - must included last) -->
		<link rel="stylesheet" href="css/themes/amethyst.css">
		<!-- END Stylesheets -->

		<!-- Modernizr (browser feature detection library) -->
		<script src="js/vendor/modernizr-3.3.1.min.js"></script>
	</head>

	<body>
		<!-- Login Container -->
		<div id="login-container">
			<!-- Login Header -->
			<h1 class="h2 text-light text-center push-top-bottom animation-slideDown">
                <i class="fa fa-cube"></i> <strong>欢迎来到&nbsp;问道</strong>
            </h1>
			<!-- END Login Header -->

			<!-- Login Block -->
			<div class="block animation-fadeInQuickInv">
				<!-- Login Title -->
				<div class="block-title">
					<div class="block-options pull-right">
						<!--<a href="page_ready_reminder.html" class="btn btn-effect-ripple btn-primary" data-toggle="tooltip" data-placement="left" title="忘记密码?"><i class="fa fa-exclamation-circle"></i></a>-->
						<!--<a href="page_ready_register.html" class="btn btn-effect-ripple btn-primary" data-toggle="tooltip" data-placement="left" title="Create new account"><i class="fa fa-plus"></i></a>-->
					</div>
					<h2>登录</h2>
				</div>
				<!-- END Login Title -->

				<!-- Login Form -->
				<form id="form-login" class="form-horizontal">
					<div class="form-group">
						<div class="col-xs-12">
							<input type="text" id="login-email" name="login-email" class="form-control" placeholder="账号">
						</div>
					</div>
					<div class="form-group">
						<div class="col-xs-12">
							<input type="password" id="login-password" name="login-password" class="form-control" placeholder="密码">
						</div>
					</div>
					<div class="form-group hidden" id="group-note">
						<div id="note" style="color: red;margin: 0 4%;"></div>
					</div>
					<div class="form-group form-actions">
						<div class="col-xs-8" style="margin-top: 5%;">
							<!--<label class="csscheckbox csscheckbox-primary">
                                <input type="checkbox" id="login-remember-me" name="login-remember-me">
                                <span></span>
                            </label>-->
							<a href="#modal-info" data-toggle="modal" >登录遇到问题</a>
						</div>
						<div class="col-xs-4 text-right">
							<button type="button" class="btn btn-effect-ripple btn-sm btn-primary" onclick="login()"><i class="fa fa-check"></i>登录</button>
						</div>
					</div>
				</form>
				<!-- END Login Form -->

			</div>
			<!-- END Login Block -->

			<!-- Footer -->
			<!--<footer class="text-muted text-center animation-pullUp">
                <small><span id="year-copy"></span> &copy; <a href="http://goo.gl/RcsdAh" target="_blank">AppUI 2.7</a></small>
            </footer>-->
			<!-- END Footer -->
		</div>
		<!-- END Login Container -->
		<!-- info Modal -->
		<div id="modal-info" class="modal" tabindex="-1" role="dialog" aria-hidden="true" style="z-index: 2000;">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						<h3 class="modal-title"><strong>维护人员信息：</strong></h3>
					</div>
					<div class="modal-body">
						<p>手机号：18758263422（543422）</p>
						<p>微 信：F_10086_</p>
						<p>Q Q ：1390415732</p>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-effect-ripple btn-primary" data-dismiss="modal">确定</button>
					</div>
				</div>
			</div>
		</div>
		<!-- END info Modal -->

		<!-- jQuery, Bootstrap, jQuery plugins and Custom JS code -->
		<script src="js/vendor/jquery-2.2.4.min.js"></script>
		<script src="js/vendor/bootstrap.min.js"></script>
		<script src="js/plugins.js"></script>
		<script src="js/app.js"></script>

		<!-- Load and execute javascript code used only in this page -->
		<!--<script src="js/pages/readyLogin.js"></script>-->
		<script type="text/javascript">
			/*ip = 'localhost:80',*/
			var	ip,
				loginUrl = '/login';
			var configJson='js/confing.json'
			$.getJSON(configJson,function(data){
				ip=data.urlip;
			})
			$(function() {
//				login();
				//				ReadyLogin.init();
			});

			function login() {
				$.ajax({
					type: "post",
					url: ip+loginUrl,
					data: JSON.stringify({
						username: $("#login-email").val(),//"admin123456",
						password: $("#login-password").val()//"admin123456"
					}),
					async: true,
					dataType: "json",
					contentType: "application/json",
					xhrFields: {
						withCredentials: true
					},
					crossDomain: true,
					success: function(res) {
						if(res.code == 0) {
							location.href="questionnaire.html";
						}else{
							$("#group-note").removeClass("hidden");
							$("#note").html(res.msg)
						}
					},
					Error: function() {
						alert("服务器出错");
					}
				});

			}
		</script>
	</body>

</html>